home *** CD-ROM | disk | FTP | other *** search
- Path: cs.ruu.nl!usenet
- From: Wessel Dankers <wsldanke@cs.ruu.nl>
- Newsgroups: comp.sys.amiga.programmer
- Subject: Re: x ^= y ^= x ^= y;
- Date: Tue, 27 Feb 1996 09:45:50 +0100
- Organization: Universiteit Utrecht, Dept. of Computer Science
- Message-ID: <3132C4BE.2D60@cs.ruu.nl>
- References: <1286.6624T1439T237@cs.ruu.nl> <3Du8y*20g@yaps.rhein.de>
- NNTP-Posting-Host: dis.cs.ruu.nl
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 2.0 (X11; I; HP-UX A.09.05 9000/712)
- CC: arno@yaps.rhein.de
-
- Arno Eigenwillig wrote:
- >
- > In article <1286.6624T1439T237@cs.ruu.nl>, Wessel Dankers writes:
- >
- > > Which can of course be rewritten as:
- > >
- > > x ^= y;
- > > y ^= x;
- > > x ^= y;
- >
- > Yes.
- >
- > > or if you want it real fancy:
- > >
- > > x ^= y ^= x ^= y;
- >
- > No. Reread your C text book and find out about sequence points, side
- > effects, and which combinations of them are not allowed.
-
- If you would have taken a quick peek yourself you would have seen that an
- assignment has a return-value of itself. Anyway, I tested it and it worked.
-
- --
- Wessel Dankers <wsldanke@cs.ruu.nl>
-
- `Never imagine yourself not to be otherwise than what it might appear to
- others that what you were or might have been was not otherwise than what
- you had been would have appeared to them to be otherwise.'
-